package org.NooLab.glue.net.http.rest.resources;

import java.io.IOException;

import org.NooLab.glue.net.http.rest.resources.BaseResource.MessageSupply;
import org.NooLab.utilities.logging.PrintLog;
import org.restlet.Request;
import org.restlet.Response;
import org.restlet.data.Form;
import org.restlet.data.MediaType;
import org.restlet.data.Parameter;
import org.restlet.data.Status;
import org.restlet.engine.http.header.HeaderConstants;
import org.restlet.ext.xml.DomRepresentation;
import org.restlet.representation.Representation;
import org.restlet.resource.Get;
import org.restlet.resource.Post;
import org.restlet.resource.Put;



/**
 * 
 * this serves the URI path  /data/item/{id}
 * 
 */
public class GetResource extends BaseResource{
	
	
	Object resourcegetid;
	String getIdStr;
	
	
	public GetResource(){
		 
	}
	
	@Get
	public String GetHandlerGet(){
		String getmsg;
		
		 
		getIdStr = (String)getRequestAttributes().get("transactionid");
		
												out.print(2, "handling get request  for results, get ID = <> ...") ;
		getmsg = "X" ;
		
		return getmsg;
	}
 
	
	
	protected void addResponseHeader(String name, String value) {
		
	    Form responseHeaders = (Form)getResponse().getAttributes().get(HeaderConstants.ATTRIBUTE_HEADERS);
	    if (responseHeaders == null) {
	        responseHeaders = new Form();
	        getResponse().getAttributes().put(HeaderConstants.ATTRIBUTE_HEADERS, responseHeaders);
	    }
	    responseHeaders.add(new Parameter(name, value));
	}
	

	 /*
	  * getResponse().setEntity() method from acceptRepresentation() will accept the new FileRepresentation
	  * 
	  */

}
